{% extends 'layouts/layout_home.html' %}
{% block title %}
Upload m3u | {{ config['PUBLIC_CONFIG'].site.title }}
{% endblock %}


{% block content %}
<div class="panel panel-default">
    <div class="panel-heading">
        <h1 class="panel-title">
            <div class="col-md-11">
                <a href="{{ url_for('HomeView:index') }}">{{ config['PUBLIC_CONFIG'].site.title }}</a>
            </div>
            <div>Version: {{ config['PUBLIC_CONFIG'].project.version }}</div>
        </h1>
    </div>
    <div class="panel-body">
        <div class="container-fluid">
            <div class="row well">
                <h3>Upload m3u files</h3>
                <p>Note: Please upload m3u files for service.</p>
                {{ util.flashed_messages(dismissible=True, container=False) }}
                <form action="{{ url_for('ServiceView:upload_files') }}" method="POST" class="form" role="form"
                      enctype="multipart/form-data">
                    {{ form.hidden_tag() }}
                    <div class="col-md-3">
                        {{ form.files }}
                    </div>
                    <div class="col-md-3">
                        Type: {{ form.type }}
                    </div>
                    <div class="col-md-3">
                        {{ form_field(form.upload, class="btn btn-success") }}
                    </div>
                </form>
            </div>
            <div class="row">
                <a href="{{ url_for('ProviderView:dashboard') }}" role="button" class="btn btn-info">
                    Dashboard
                </a>
            </div>
        </div>
    </div>
</div>
{%- endblock %}